﻿using Jinjia.Approve.Model.Enum;
using Newtonsoft.Json;

namespace Jinjia.Approve.Model.VM.OA
{
    public class BaseOAResponse<T> where T : class, new()
    {
        /// <summary>
        /// 响应码
        /// </summary>
        [JsonProperty("code")]
        public OAApiResultCode Code { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        [JsonProperty("msg")]
        public string Msg { get; set; }

        /// <summary>
        /// 响应结果是否错误
        /// </summary>
        [JsonProperty("success"),JsonIgnore]
        public bool Success { get; set; }

        [JsonProperty("data")]
        public T Data { get; set; } = new T();
    }
}